﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RelationExpertSystem.Relation
{
    public class Step_Sister : RelationBase
    {
        private static Step_Sister _singleton = new Step_Sister();
        public static Step_Sister Instance
        {
            get { return _singleton; }
        }

        private Step_Sister() { }

        public override bool IsRelated(Person a, Person b)
        {
            // b is a's Step_Sister IFF b is female and b is a's step sibling
            return b.Sex == Sex.Female && a.KnownRelation(Step_Sibling.Instance, b);
        }

        public override IEnumerable<IRelation> GetDependencies()
        {
            return new HashSet<IRelation>(new IRelation[] { Step_Sibling.Instance });
        }
    }
}
